package com.aaa.boot.service.impl;

import com.aaa.boot.mapper.GoodsMapper;
import com.aaa.boot.pojo.vo.CategoryVO;
import com.aaa.boot.pojo.vo.GoodVO;
import com.aaa.boot.pojo.vo.GoodsVO;
import com.aaa.boot.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * @author MK
 * @version 1.0
 * 创建时间：2025/4/2 16:50
 */
@Service
public class GoodsServiceImpl implements GoodsService {
    @Autowired
    private GoodsMapper goodsMapper;
    @Override
    public List<CategoryVO>getCategories() {
        return goodsMapper.getCategories();
    }

    @Override
    public List<GoodsVO> getGoodsByCategoryId(Integer id) {
        return goodsMapper.getGoodsByCategoryId(id);
    }

    @Override
    public List<String> getBannersByCategoryId(Integer id) {
        return goodsMapper.getBannersByCategoryId(id);
    }

    @Override
    public GoodVO getGoodById(Integer id) {
        return goodsMapper.getGoodById(id);
    }
}
